package org.csmzxy.class2333;
//家电类
class ElectricalApp{
    String type;
    public void turnOn(){
        System.out.println("家电已经开启");
    }
}
//电视机类
class TV extends ElectricalApp{
    String type;
    public void turnOn(){
        System.out.println("电视机已经打开");
    }
    public void print(){
        super.type="电视机";
        type="液晶电视";
        System.out.println("家电的类型为"+super.type);
        System.out.println("电视机的类型为"+type);
        super.turnOn();
        turnOn();
    }
}


public class Example03 {
    public static void main(String[]args){
        TV tv =new TV();
        tv.print();
    }
}
